spd: Use `ENABLE_ASSERTIONS` instead of `DEBUG`
authorAntonio Nino Diaz <[email protected]>
Thu, 19 Oct 2017 15:55:48 +0000 (16:55 +0100)
committerAntonio Nino Diaz <[email protected]>
Wed, 8 Nov 2017 18:05:14 +0000 (18:05 +0000)
A line in the upstream SPDs is only compiled in in `DEBUG` builds. This
line is used to help with assertions and so assertion failures can
happen in release builds with assertions enabled. Use
`ENABLE_ASSERTIONS` instead of `DEBUG`.

This bug was introduced in commit aa61368eb5, which introduced the build
option `ENABLE_ASSERTIONS`.

Change-Id: I7977df9c89c68677b00099b2a1926fa3cb0937c6
Signed-off-by: Antonio Nino Diaz <[email protected]>
services/spd/opteed/opteed_common.c
services/spd/tlkd/tlkd_common.c
services/spd/tspd/tspd_common.c

index 2693e7d1d561d51ce113ca3464a25450e40b7476..e5e2be77ef4717635526efdf61648cf153b3cae8 100644 (file)
@@ -78,7 +78,7 @@ uint64_t opteed_synchronous_sp_entry(optee_context_t *optee_ctx)
        cm_set_next_eret_context(SECURE);
 
        rc = opteed_enter_sp(&optee_ctx->c_rt_ctx);
-#if DEBUG
+#if ENABLE_ASSERTIONS
        optee_ctx->c_rt_ctx = 0;
 #endif
 
index 599d7a30f83b5682836ab5e32fec7d81c1591f2e..483d45b689d03b35641c48999a3b0a3c82946b5f 100644 (file)
@@ -131,7 +131,7 @@ uint64_t tlkd_synchronous_sp_entry(tlk_context_t *tlk_ctx)
        cm_set_next_eret_context(SECURE);
 
        rc = tlkd_enter_sp(&tlk_ctx->c_rt_ctx);
-#if DEBUG
+#if ENABLE_ASSERTIONS
        tlk_ctx->c_rt_ctx = 0;
 #endif
 
index 1538232fe8330bf2fe25f4154c9f5a68c1d5c7fe..de54dbe94ddfff6d52675bde91d350929f1a1fbf 100644 (file)
@@ -79,7 +79,7 @@ uint64_t tspd_synchronous_sp_entry(tsp_context_t *tsp_ctx)
        cm_set_next_eret_context(SECURE);
 
        rc = tspd_enter_sp(&tsp_ctx->c_rt_ctx);
-#if DEBUG
+#if ENABLE_ASSERTIONS
        tsp_ctx->c_rt_ctx = 0;
 #endif